<!--
 * @Author: 龙雨欢 932838577@qq.com
 * @Date: 2023-10-06 11:59:39
 * @LastEditors: 龙雨欢 932838577@qq.com
 * @LastEditTime: 2023-11-29 18:17:45
 * @FilePath: \sxyd-vue\src\components\nenghao\enterprises.vue
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
  <div>
    <div class="selectDiv">
      <el-select v-model="value" placeholder="请选择师市" class="shishiselect" @change="changeshi">
        <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
        </el-option>
      </el-select>
    </div>
    <h3 style="text-align: center;">重点企业监管名录</h3>
    <el-table :data="tableData" stripe style="width: 100%">
      <el-table-column type="index" width="50">
      </el-table-column>
      <el-table-column prop="xzqhs" label="行政区划(省)" width="180">
      </el-table-column>
      <el-table-column prop="xzqhc" label="行政区划(市)" width="180">
      </el-table-column>
      <el-table-column prop="xzqhx" label="行政区划(县)" width="180">
      </el-table-column>
      <el-table-column prop="qymc" label="企业名称" width="480">
      </el-table-column>
      <el-table-column prop="hylb" label="行业类别" width="220">
      </el-table-column>
      <el-table-column prop="mllb" label="名录类别" width="220">
      </el-table-column>
      <el-table-column prop="gllb" label="管理类别">
      </el-table-column>
    </el-table>
  </div>
</template>

<script>
export default {
  name: 'enterprises',
  data() {
    return {
      options: [{
        value: '第一师',
        label: '第一师'
      }, {
        value: '第二师',
        label: '第二师'
      }, {
        value: '第三师',
        label: '第三师'
      }, {
        value: '第四师',
        label: '第四师'
      }, {
        value: '第五师',
        label: '第五师'
      }, {
        value: '第六师',
        label: '第六师'
      }, {
        value: '第七师',
        label: '第七师'
      }, {
        value: '第八师',
        label: '第八师'
      }, {
        value: '第九师',
        label: '第九师'
      }, {
        value: '第十师',
        label: '第十师'
      }, {
        value: '第十一师',
        label: '第十一师'
      }, {
        value: '第十二师',
        label: '第十二师'
      }, {
        value: '第十三师',
        label: '第十三师'
      }, {
        value: '第十四师',
        label: '第十四师'
      }],
      value: '第一师',
      tableData: []
    }
  },
  methods: {
    async getList() {
      const { data: result1 } = await this.$http.get('/v1.0/resultIntegration/rule/zdjgqyml/findAllByCity?city=' + this.value)
      this.tableData = result1.data;
    },
    changeshi(e) {
      this.getList()
    },
  },
 created() {
  if(window.sessionStorage.getItem('shiName')=='新疆生产建设兵团'){
    }else{
      this.value=window.sessionStorage.getItem('shiName')
      this.options=[{
        value:window.sessionStorage.getItem('shiName'),
        label:window.sessionStorage.getItem('shiName')
      }]
    }
    this.getList()
  }
}
</script>

<style scoped>
.selectDiv {
  position: absolute;
  left: 20px;
  top: 85px;
  z-index: 09999;
  display: flex;
}
</style>
